package com.bskj.common.enums;

/**
 * 第三方平台类型枚举
 * @author lishi
 * @date 2018年2月15日 下午1:35:26
 */
public enum ThirdPlatformTypeEnum {
	WeChat(1, "微信公众号"), We_Small_App(2, "微信小程序");

	private int key;
	private String value;

	private ThirdPlatformTypeEnum(int key, String value) {
		this.key = key;
		this.value = value;
	}

	public int getKey() {
		return key;
	}

	public void setKey(int key) {
		this.key = key;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public static ThirdPlatformTypeEnum get(int key) {
		for (ThirdPlatformTypeEnum typeEnum : ThirdPlatformTypeEnum.values()) {
			if (typeEnum.getKey() == key) {
				return typeEnum;
			}
		}
		return null;
	}
}
